Agentic Functionality
Build intelligent Salesforce-native AI bots with comprehensive configuration and security controls
Overview
Agentic functionality in GPTfy introduces a new way to build, configure, and test intelligent Salesforce-native bots—called Agents. These agents combine system prompts, AI models, RAG sync, and agentic prompts to act as AI-powered assistants directly within Salesforce applications or through REST APIs. This guide provides a structured approach to understanding, configuring, and using Agentic functionality.
Key Components
Agent (AI_Agent__c)
The Agent is the central entity that represents a bot in Salesforce. It defines the overall configuration for how the bot behaves. Key aspects include:
- System Prompt: Baseline instructions for the agent
- AI Model: The AI engine powering the agent
- Permission Settings: Access control and visibility
- Session Timeout (TTL): How long chat sessions remain active
- RAG Sync: Optional knowledge-based context integration
Agent Skill (AI_Agent_Skill__c)
Agent Skills act as the building blocks of the Agent's capabilities. Each skill is linked to an Agentic prompt and defines a specific type of action (like creating, updating, or deleting a record). This allows an Agent to perform business operations dynamically, guided by user conversations.
RAG Sync (AI_RAG_Sync__c & AI_RAG_Sync_Job__c)
RAG (Retrieval-Augmented Generation) Sync allows Salesforce Knowledge or custom objects to be indexed into a vector store. Agents with RAG enabled can retrieve this knowledge to provide more accurate and contextual answers to user queries.
Prompt Type: Agentic
Agentic is a new type of prompt that equips the Agent with a skill. It contains:
- Prompt Command: JSON schema format defining required inputs and expected structure
- Agentic Function Class: An Apex class implementing
AIAgenticInterfacethat performs the requested action

Configuring an Agent
Create a New Agent
When creating a new Agent, you define its identity and operational settings:
Basic Configuration
- Name & DeveloperName: The agent's identifier; the system automatically generates a developer-friendly name
- System Prompt: Baseline instructions guiding the Agent's behavior
- AI Model: Choose an AI engine (e.g., GPT model) to power the agent
- Profiles & Permission Sets: Restrict agent visibility to specific user groups
Advanced Settings
- Use Thread ID: Decide whether conversations are linked by thread IDs (lightweight context) or full histories (more detailed but heavier)
- TTL (Minutes) & TTL Message: Set how long a chat session remains active, and what message is shown when it expires
- RAG Sync (Optional): Connect a knowledge base sync record for agents that need knowledge-driven responses
Add Agent Skills
After configuring an Agent, link specific skills to it. Each skill represents a capability defined by a prompt and an Apex function class. Examples include:
- update_Account_by_Name: Updates account details based on user input
- delete_Account_by_Name: Deletes an account record by name
- create_Opportunity: Creates a new opportunity with associated details

Add GPTfy Agent to Utility Bar
To make the Agent accessible:
- Navigate to Salesforce App Manager
- Add GPTfy Agent as a Utility Item in your Sales app
- Configure settings (icon, width, alignment) so it appears consistently for end users


Now you will see the GPTfy Agent chatbot at the bottom right corner of our application

Using the Agent
In Salesforce Utility Bar
Launch the GPTfy Agent from the utility bar of the configured app.

Available Actions:
- Select from available Agents: Access restricted by profiles/permission sets
- Start a new chat: Begins a new interaction session
- End chat: Closes the session and marks it expired in the audit logs
- Reinstate chat: Resume a previous session using the User Context ID
In GPTfy Console
The GPTfy console includes a chatbot icon with enhanced capabilities:


Conversation Sources:
- Files attached via response APIs
- RAG sync knowledge bases
- Agent Skills defined for the bot
- Every interaction is logged for traceability
Via REST API
Developers can interact with Agents programmatically through REST:
- Endpoint:
/services/apexrest/v1/agentic(or namespace-specific endpoint) - Request Format: POST request includes the agent name, user message, locale, and context ID
- Response Behavior: Mirrors the same behavior as UI-based conversations, including skill execution and RAG retrieval
Security & Audit
Agent interactions are fully auditable through Security Audit records, ensuring transparency and compliance:
Audit Fields
- Client: Where the chat was initiated (e.g., GPTfy Agent, REST API, file)
- Session Expired: Tracks if a conversation was ended
- Thread ID: Unique identifier for active conversations
- User Context ID: Used to resume older sessions
Admins can review these logs to monitor agent usage, troubleshoot issues, and ensure compliance.
Key Features
- Customizable Agent Configuration: Define prompts, models, permissions, TTL, and RAG
- Agent Skills for Business Logic: Map Apex classes and prompts to perform CRUD or workflow-specific operations
- Flexible Context Handling: Choose between thread-based or full conversation history
- Knowledge Augmentation via RAG: Equip agents with context from Salesforce Knowledge or custom objects
- Comprehensive Security Audits: Full trace of user interactions, ensuring compliance
- Multiple Access Modes: Agents can be used in Salesforce UI, GPTfy Console, or programmatically via REST API
Summary
Agentic functionality gives organizations the tools to create Salesforce-native AI agents that:
- Perform operational tasks securely and accurately
- Leverage contextual knowledge through RAG
- Are fully auditable for compliance
- Can be accessed both by end users in Salesforce apps and developers via APIs
This functionality allows businesses to deploy AI-powered assistants that align with Salesforce workflows while maintaining control and governance.